#include "ZerglingState.h"

ZerglingState::ZerglingState(int x, int y): _x(x), _y(y)
{
}

void ZerglingStateAttack::doAction(BWAPI::Unit* unit, int adjustX, int adjustY)
{
	if (timer < 100)
	{
		unit->move(BWAPI::Position(_x+adjustX, _y+adjustY));
		timer++;
	}
	else
	{
		unit->attackMove(BWAPI::Position(_x2+adjustX, _y2+adjustY));
	}
}

void ZerglingStateRetreat::doAction(BWAPI::Unit* unit, int adjustX, int adjustY)
{
	unit->move(BWAPI::Position(_x+adjustX, _y+adjustY));
}